import Layout from "@/layout"

export default {
  path: "/config",
  name: "config",
  redirect: "/config/accounts",
  component: Layout,
  alwaysShow: true, // will always show the root menu
  meta: {
    title: "系统设置",
    icon: "example",
    roles: ["admin"], // you can set roles in root nav
  },
  children: [
    {
      path: "accounts",
      component: () =>
        import(
          /* webpackChunkName: "configAccounts" */ "@/views/Config/Accounts"
        ),
      name: "accounts",
      meta: {
        title: "账号管理",
        roles: ["admin"], // or you can only set roles in sub nav
      },
    },
    {
      path: "toolbar",
      name: "toolbar",
      component: () =>
        import(
          /* webpackChunkName: "configToolbar" */ "@/views/Config/Toolbar"
        ),
      meta: {
        roles: ["admin"],
        title: "自定义工具栏",
      },
    },
    {
      path: "log",
      name: "log",
      component: () =>
        import(/* webpackChunkName: "configLog" */ "@/views/Config/Log"),
      meta: {
        roles: ["admin"],
        title: "操作日志",
      },
    },
    {
      path: "setIp",
      name: "setIp",
      component: () =>
        import(/* webpackChunkName: "configSetIp" */ "@/views/Config/SetIp"),
      meta: {
        roles: ["admin"],
        title: "平台设置",
      },
    },
    {
      path: "faceDetect",
      name: "FaceDetect",
      component: () =>
        import(
          /* webpackChunkName: "configSetIp" */ "@/views/Config/FaceDetect"
        ),
      meta: {
        roles: ["admin"],
        title: "人脸识别设备设置",
      },
    },
  ],
}
